package up5.master1.agent.projet.agents;

import jade.core.Agent;
import jade.core.behaviours.CyclicBehaviour;
import jade.lang.acl.ACLMessage;

import java.util.ArrayList;
import java.util.List;

import up5.master1.agent.projet.data.Info;
import up5.master1.agent.projet.data.Key;
import up5.master1.agent.projet.data.Map;
import up5.master1.agent.projet.data.Path;

/**
 * this agent is an AssistantAgent  for the seeker agent
 * at the very beginning it has a map of the place where the locked agent and seeker agent are
 * but he doesn't have information
 * @author belkhir
 *
 */
public class AssistantAgent extends Agent {


	private List<Path> paths;
	private List<Path> usedPaths;

	private List<Key>  keys;
	private Map map;
	private List<Info> infos;

	/**
	 * init the AssistantAgent
	 * (non-Javadoc)
	 * @see jade.core.Agent#setup()
	 */
	public void setup(){
		this.paths=new ArrayList<Path>();
		this.usedPaths=new ArrayList<Path>();		
		this.keys= new ArrayList<Key>();
		this.infos=new ArrayList<Info>();
		
		
		this.addBehaviour(new CyclicBehaviour(this){

			@Override
			public void action() {

				ACLMessage msg=myAgent.receive();
				
				if(msg!=null){//we check the message
					// if there is a message then we read
					if(msg.getPerformative()==ACLMessage.REQUEST)
					
				
					
					
					
					
					
					
					
				}			
			}
			
			
			
			
		});
		
		
	}

	/**
	 * this method  is an activity that search a Path in the map,
	 * if there is no path in the usedListPath we try to find a new path
	 * @return
	 */
	private Path searchPath(){}
	/**
	 * this method is an activity that search a Key in the map
	 * @return
	 */
	private Key  searchKey (){
		
	}

	/**
	 * this message store information received by the agent in the list of informations
	 * @param info
	 */
	private void storeInfo(Info info){
		this.infos.add(info);	}
	
}